package cn.bugstack.springframework.beans.factory.support;


import cn.bugstack.springframework.beans.BeansException;
import cn.bugstack.springframework.beans.factory.config.BeanDefinition;

/**
 * @author ouyangzhao
 * 注册bean的接口类
 */
public interface BeanDefinitionRegistry {
    /**
     * 向注册表里边注册bean
     * @param beanName
     * @param definition
     */
    void registerBeanDefinition(String beanName,BeanDefinition definition);

    /**
     * 通过beanName来获取bean对象
     * @param beanName
     * @return
     * @throws BeansException
     */
    BeanDefinition getBeanDefinition(String beanName) throws BeansException;

    /**
     * @description:判断容器中是否包含指定名称的BeanDefinition
     * @author ouyangzhao
     * @param beanName
     * @date 2022/8/1 22:07
     * @version 1.0
    */
    boolean containsBeanDefinition(String beanName) throws BeansException;



}
